package com.qf.stu.application.controller;


import com.qf.stu.application.entity.Stu;
import com.qf.stu.application.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * (Stu)表控制层
 *
 * @author makejava
 * @since 2023-11-15 09:14:18
 */
@RestController
@RequestMapping("/stu")
public class StuController {

    @Autowired
    private StuService service;

    @RequestMapping("/insert")
    public String insert(){
        System.out.println("保存学生信息....");
        Stu stu = new Stu()
                .setName("小明")
                .setAge(18);
        service.save(stu);
        return "succ";
    }
}

